package com.chixing.day03_oop;

public class Account {
    private long accNo;
    private String accName;
    private long accPassword;
    private long accTelno;
    private double accBalance;
    private String accType;

    public Account(long no,String name,long pwd,long tel,double bal,int type){
        System.out.println("账号 ："+ no + " " +" 姓名 ："+ name + " " + "密码 ："+ pwd + " " + "手机号 ：" +tel + " " + "余额为 ：" +  bal + " " + " 账户类型："+ type);
    }

    public long getAccNo() {
        return accNo;
    }

    public void setAccNo(long accNo) {
        this.accNo = accNo;
    }

    public String getAccName() {
        return accName;
    }

    public void setAccName(String accName) {
        this.accName = accName;
    }

    public long getAccPassword() {
        return accPassword;
    }

    public void setAccPassword(long accPassword) {
        this.accPassword = accPassword;
    }

    public long getAccTelno() {
        return accTelno;
    }

    public void setAccTelno(long accTelno) {
        this.accTelno = accTelno;
        System.out.println("手机号替换为 ： " + this.accTelno);
    }

    public double getAccBalance() {
        return accBalance;
    }

    public void setAccBalance(double accBalance) {
        this.accBalance = accBalance;
    }

    public String getAccType() {
        return accType;
    }

    public void setAccType(String accType) {
        this.accType = accType;
    }


    //存款
    public  void depoist(double money){
        this.accBalance += money;
        System.out .println("存入"+money+"元");
        System.out.println("余额为 ：" + this.accBalance);



    }


    //取款
    public void  withdraw(double money){
        this.accBalance -= money;
        System.out .println("取出"+money+"元");
        System.out.println("余额为 ：" + this.accBalance);

    }

    public void adminType() {
            if (this.accType =="0")
                this.accType = "储蓄账户";
            if (this.accType =="1") {
                this.accType = "信用账户";
            }
        }






}
